// Object类创建对象
var oPerson = new Object();

// 添加属性
oPerson.name = 'jerry';
oPerson.age = 32;

// 添加方法
oPerson.show = function () {
    console.log(this.name + this.age);
};

// 调用属性和方法
console.log(typeof oPerson);
console.log(oPerson);
console.log(oPerson.name + oPerson.age);
oPerson.show();

// 字面量创建对象
var oStu = {
    name: 'Amy',
    age: 26,
    gender: 1,
    show: function () {
        console.log(this.name + this.age);
    }
};

console.log(typeof oStu);
console.log(oStu);
console.log(oStu.name + oStu.age);
oStu.show();